Skip to main content

SwaggerClient-php

This is the API for the Estuary application.

This PHP package is automatically generated by the Swagger Codegen project:

Requirements

PHP 5.5 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
"repositories": [
{
"type": "git",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/SwaggerClient-php/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: bearerAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new Swagger\Client\Api\AdminApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);

try {
$result = $apiInstance->adminMinersGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AdminApi->adminMinersGet: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: bearerAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new Swagger\Client\Api\AdminApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = array("body_example"); // string[] | Peer ids

try {
$result = $apiInstance->adminPeeringPeersDelete($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AdminApi->adminPeeringPeersDelete: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: bearerAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new Swagger\Client\Api\AdminApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);

try {
$result = $apiInstance->adminPeeringPeersGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AdminApi->adminPeeringPeersGet: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: bearerAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new Swagger\Client\Api\AdminApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = array(new \Swagger\Client\Model\PeeringPeeringPeer()); // \Swagger\Client\Model\PeeringPeeringPeer[] | Peering Peer array

try {
$result = $apiInstance->adminPeeringPeersPost($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AdminApi->adminPeeringPeersPost: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: bearerAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new Swagger\Client\Api\AdminApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);

try {
$result = $apiInstance->adminPeeringStartPost();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AdminApi->adminPeeringStartPost: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: bearerAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new Swagger\Client\Api\AdminApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);

try {
$result = $apiInstance->adminPeeringStatusGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AdminApi->adminPeeringStatusGet: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: bearerAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new Swagger\Client\Api\AdminApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);

try {
$result = $apiInstance->adminPeeringStopPost();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AdminApi->adminPeeringStopPost: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: bearerAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new Swagger\Client\Api\AdminApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);

try {
$result = $apiInstance->adminSystemConfigGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AdminApi->adminSystemConfigGet: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: bearerAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new Swagger\Client\Api\AdminApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);

try {
$result = $apiInstance->adminUsersGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AdminApi->adminUsersGet: ', $e->getMessage(), PHP_EOL;
}
?>

Documentation for API Endpoints

All URIs are relative to //api.estuary.tech/

ClassMethodHTTP requestDescription
AdminApiadminMinersGetGET /admin/miners/Get all miners
AdminApiadminPeeringPeersDeleteDELETE /admin/peering/peersRemove peers on Peering Service
AdminApiadminPeeringPeersGetGET /admin/peering/peersList all Peering peers
AdminApiadminPeeringPeersPostPOST /admin/peering/peersAdd peers on Peering Service
AdminApiadminPeeringStartPostPOST /admin/peering/startStart Peering
AdminApiadminPeeringStatusGetGET /admin/peering/statusCheck Peering Status
AdminApiadminPeeringStopPostPOST /admin/peering/stopStop Peering
AdminApiadminSystemConfigGetGET /admin/system/configGet systems(estuary/shuttle) config
AdminApiadminUsersGetGET /admin/usersGet all users
AutoretrieveApiadminAutoretrieveInitPostPOST /admin/autoretrieve/initRegister autoretrieve server
AutoretrieveApiadminAutoretrieveListGetGET /admin/autoretrieve/listList autoretrieve servers
AutoretrieveApiautoretrieveHeartbeatPostPOST /autoretrieve/heartbeatMarks autoretrieve server as up
CollectionsApicollectionsColuuidCommitPostPOST /collections/{coluuid}/commitProduce a CID of the collection contents
CollectionsApicollectionsColuuidContentsDeleteDELETE /collections/{coluuid}/contentsDeletes a content from a collection
CollectionsApicollectionsColuuidDeleteDELETE /collections/{coluuid}Deletes a collection
CollectionsApicollectionsColuuidGetGET /collections/{coluuid}Get contents in a collection
CollectionsApicollectionsColuuidPostPOST /collections/{coluuid}Add contents to a collection
CollectionsApicollectionsFsAddPostPOST /collections/fs/addAdd a file to a collection
CollectionsApicollectionsGetGET /collections/List all collections
CollectionsApicollectionsPostPOST /collections/Create a new collection
ContentApiadminInvitesCodePostPOST /admin/invites/{code}Create an Estuary invite
ContentApiadminInvitesGetGET /admin/invitesGet Estuary invites
ContentApicontentAddCarPostPOST /content/add-carAdd Car object
ContentApicontentAddIpfsPostPOST /content/add-ipfsAdd IPFS object
ContentApicontentAddPostPOST /content/addAdd new content
ContentApicontentAggregatedContentGetGET /content/aggregated/{content}Get aggregated content stats
ContentApicontentAllDealsGetGET /content/all-dealsGet all deals for a user
ContentApicontentBwUsageContentGetGET /content/bw-usage/{content}Get content bandwidth
ContentApicontentContentsGetGET /content/contentsGet user contents
ContentApicontentCreatePostPOST /content/createAdd a new content
ContentApicontentDealsGetGET /content/dealsContent with deals
ContentApicontentEnsureReplicationDatacidGetGET /content/ensure-replication/{datacid}Ensure Replication
ContentApicontentFailuresContentGetGET /content/failures/{content}List all failures for a content
ContentApicontentIdGetGET /content/{id}Content
ContentApicontentListGetGET /content/listList all pinned content
ContentApicontentStagingZonesGetGET /content/staging-zonesGet staging zone for user, excluding its contents
ContentApicontentStagingZonesStagingZoneContentsGetGET /content/staging-zones/{staging_zone}/contentsGet contents for a staging zone
ContentApicontentStagingZonesStagingZoneGetGET /content/staging-zones/{staging_zone}Get staging zone without its contents field populated
ContentApicontentStatsGetGET /content/statsGet content statistics
ContentApicontentStatusIdGetGET /content/status/{id}Content Status
DealsApidealEstimatePostPOST /deal/estimateEstimate the cost of a deal
DealsApidealInfoDealidGetGET /deal/info/{dealid}Get Deal Info
DealsApidealProposalPropcidGetGET /deal/proposal/{propcid}Get Proposal
DealsApidealQueryMinerGetGET /deal/query/{miner}Query Ask
DealsApidealStatusByProposalPropcidGetGET /deal/status-by-proposal/{propcid}Get Deal Status by PropCid
DealsApidealStatusMinerPropcidGetGET /deal/status/{miner}/{propcid}Deal Status
DealsApidealTransferInProgressGetGET /deal/transfer/in-progressTransfer In Progress
DealsApidealTransferStatusPostPOST /deal/transfer/statusTransfer Status
DealsApidealsFailuresGetGET /deals/failuresGet storage failures for user
DealsApidealsMakeMinerPostPOST /deals/make/{miner}Make Deal
DealsApidealsStatusDealGetGET /deals/status/{deal}Get Deal Status
DealsApipublicDealsFailuresGetGET /public/deals/failuresGet storage failures
DealsApipublicMinersStorageQueryMinerGetGET /public/miners/storage/query/{miner}Query Ask
DefaultApiviewerGetGET /viewerFetch viewer details
MetricsApipublicMetricsDealsOnChainGetGET /public/metrics/deals-on-chainGet deal metrics
MinerApiminerClaimMinerGetGET /miner/claim/{miner}Get Claim Miner Message
MinerApiminerClaimPostPOST /miner/claimClaim Miner
MinerApiminerSetInfoMinerPutPUT /miner/set-info/{miner}Set Miner Info
MinerApiminerSuspendMinerPostPOST /miner/suspend/{miner}Suspend Miner
MinerApiminerUnsuspendMinerPutPUT /miner/unsuspend/{miner}Unuspend Miner
MinerApipublicMinersDealsMinerGetGET /public/miners/deals/{miner}Get all miners deals
MinerApipublicMinersStatsMinerGetGET /public/miners/stats/{miner}Get miner stats
NetApiadminMinersGetGET /admin/miners/Get all miners
NetApipublicMinersFailuresMinerGetGET /public/miners/failures/{miner}Get all miners
NetApipublicNetAddrsGetGET /public/net/addrsNet Addrs
NetApipublicNetPeersGetGET /public/net/peersNet Peers
PinningApipinningPinsGetGET /pinning/pinsList all pin status objects
PinningApipinningPinsPinidDeleteDELETE /pinning/pins/{pinid}Delete a pinned object
PinningApipinningPinsPinidGetGET /pinning/pins/{pinid}Get a pin status object
PinningApipinningPinsPinidPostPOST /pinning/pins/{pinid}Replace a pinned object
PinningApipinningPinsPostPOST /pinning/pinsAdd and pin object
PublicApigetCidGetGET /get/{cid}Get Full Content by Cid
PublicApipublicByCidCidGetGET /public/by-cid/{cid}Get Content by Cid
PublicApipublicInfoGetGET /public/infoGet public node info
PublicApipublicMetricsDealsOnChainGetGET /public/metrics/deals-on-chainGet deal metrics
PublicApipublicMinersDealsMinerGetGET /public/miners/deals/{miner}Get all miners deals
PublicApipublicMinersFailuresMinerGetGET /public/miners/failures/{miner}Get all miners
PublicApipublicMinersStatsMinerGetGET /public/miners/stats/{miner}Get miner stats
PublicApipublicNetAddrsGetGET /public/net/addrsNet Addrs
PublicApipublicNetPeersGetGET /public/net/peersNet Peers
PublicApipublicStatsGetGET /public/statsPublic stats
UserApiuserApiKeysGetGET /user/api-keysGet API keys for a user
UserApiuserApiKeysKeyOrHashDeleteDELETE /user/api-keys/{key_or_hash}Revoke a User API Key.
UserApiuserApiKeysPostPOST /user/api-keysCreate API keys for a user
UserApiuserExportGetGET /user/exportExport user data
UserApiuserStatsGetGET /user/statsGet stats for the current user

Documentation For Models

Documentation For Authorization

bearerAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Author